// pages/info/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tabs: [{
        id: 0,
        name: "已知",
        isActive: true
      },
      {
        id: 1,
        name: "请假",
        isActive: false
      },
      {
        id: 2,
        name: "未回复",
        isActive: false
      }
    ]
  },

  // 接收子组件传递的数据
  handleItemChange(e) {
    // 接收传递过来的参数
    const {
      index
    } = e.detail;
    let {
      tabs
    } = this.data;
    tabs.forEach((v, i) => i === index ? v.isActive = true : v.isActive = false);

    this.setData({
      tabs
    })
  }

})